#include <stdio.h>
#include <stdlib.h>
#include "StudentMain.h"

int main()
{
	int A, B, C;
	node* head = (node*)malloc(sizeof(head));
	head->data = NULL;
	head->next = head;
	head->prve = head;
	
	MainMenu();
	scanf("%d", &A);
	while(1)
	{
	switch(A)
	{
		case 1:
		{
			AdminMenu();
			scanf("%d", &B);
			switch(B)
			{
				case 0:
				{
					exit(0);
				}
				break;
				case 1:
				{
					AddStudent(head);
				}
				break;
				case 2:
				{
					FindStudent(head);
				}
				break;
				case 3:
				{
					UpdataStudent(head);	
				}
				break;
				case 4:
				{
					DeleteStudent(head);	
				}
				break;
				case 5:
				{
					ShowAllStu(head);	
				}
				break;
				case 6:
				{
					BubbleSort(head);		
				}
				break;
				case 7:
				{
					
				}
				break;
			}		
		}
		break;
		case 2:
		{
			StuMenu();
		}
		break;
		case 0:
		{
			printf("\n期待下次与你相见！\n");
			exit(0);
		}
		break;
		default:
		{
			printf("\n输入有误！\n");
		}
		break;
	}
	}	
}
